home *** CD-ROM | disk | FTP | other *** search
- //////////////////////////////////////////////////
- // PAYLIST.H
- // Concrete List Class For a Payroll List.
- // By David Brumbaugh
- //////////////////////////////////////////////////
-
- #ifndef PAYLIST_H
- #define PAYLIST_H
- #include "pinclas.h"
-
- struct employee
- {
- char last[21], first[11];
- double pay_rate; // Dollars per day
- long days_worked;
- // Days worked in this pay period.
- };
-
- class PayList: public Pfm_List {
- protected:
- employee empBuffer;
-
- public:
- // Constructors
- PayList():Pfm_List("payroll.db","Employees")
- {default_key = DB_Column(table,"LastFirst"); }
- PayList(DB &open_db):Pfm_List(open_db, "Employees")
- {default_key = DB_Column(table,"LastFirst");}
- PayList(DB &open_db, DBTAB &db_table):
- Pfm_List(open_db, db_table)
- {default_key = DB_Column(table,"LastFirst");}
-
- // List Navigation
- virtual Boolean find (char *last),
- find(char *last, char *first);
- virtual Boolean find(void *key)
- {return (find( (char *) key));}
-
- // List Interface
- virtual void add(employee &emp);
- virtual void replace(employee &emp);
- virtual void get(employee &emp);
- virtual void *current()
- { get(empBuffer); return (void *) &empBuffer;}
-
- };
- #endif
-
-